effortlessly handle class imbalance
How to Effortlessly Handle Class Imbalance with Python and SMOTE
Let's start with a naive approach. You'll create a Random Forest model on the dataset and completely ignore the class imbalance. To start, you'll have to split the dataset into training and testing portions. Ideally, you want the percentage roughly the same in the train and test sets. Here's how to do the split and check the percentage of the positive class: Let's make it as simple as possible.